module.exports = {
    getSearchData: (phoneData, keyword) => {
        return phoneData.filter(item => {
            let field = item.field.toLowerCase(),
                slogan = item.slogan.substring(0, 10);
            if (!keyword) {
                return true;
            }
            return field.includes(keyword) || slogan.includes(keyword);
        })
    }
}